<include file="__THEME__/header" />
<link href="../Public/css/photo.css" rel="stylesheet" type="text/css" />
<!-- 头部 end -->

<div class="content"><!-- 内容 begin  -->

	<include file="__THEME__/apps" />

	<div class="main"> <!-- 右侧内容 begin  -->

		<div class="page_title"> <!-- page_title begin -->
			<h2><img src="{$APPINFO['APP_ICON']}" />{$APPINFO['APP_CNNAME']}</h2>
		<div class="c"></div>
</div><!-- page_title end -->

		<div class="tab-menu"><!-- 切换标签 begin  -->
		<ul>
			<li><a href="__URL__/index" class="on"><span>普通上传</span></a></li>
			<li><a href="__URL__/flash<if condition=" $_GET['albumId'] gt 0 ">/albumId/{.albumId}</if>"><span>批量上传</span></a></li>
			<if condition="$setting['open_camera'] eq 1"><li><a href="__URL__/camera"><span>在线拍照</span></a></li></if>
			<li><a href="__APP__/Index/photos"><span>返回我的{$APPINFO['APP_CNNAME']}</span></a></li>
        </ul>
		</div><!-- 切换标签 end  -->
		
		<div class="photoBox">
        	<form method="post" action="__APP__/Upload/upload_muti_pic" enctype="multipart/form-data" name="upload_single_pic" id="upload_single_pic" onsubmit="return start_upload();">
			<div class="upload">
			<ul>
        	<li>
            	<div class="c1">选择{$APPINFO['APP_CNNAME']}专辑：</div>
              	<div class="c2">
				{:W('AlbumList',array( 'uid'=>$mid , 'form_name'=>'albumId' , 'selected'=>intval($_GET['albumId']),'table_pre'=>'photo_' ) )}
                <a href="#" onclick="create_album({$mid})">[创建专辑]</a>
            	</div>
        	</li>
            <li>
            	<div class="c1">{$APPINFO['APP_CNNAME']}1：</div>
                <div class="c2"><input type="file" name="fileField[]" id="fileField_1" /></div>
        	</li>
            <li>
              	<div class="c1">{$APPINFO['APP_CNNAME']}2：</div>
                <div class="c2"><input type="file" name="fileField[]" id="fileField_2" /></div>
        	</li>
            <li>
             	<div class="c1">{$APPINFO['APP_CNNAME']}3：</div>
                <div class="c2"><input type="file" name="fileField[]" id="fileField_3" /></div>
        	</li>
            <li>
              	<div class="c1">{$APPINFO['APP_CNNAME']}4：</div>
                <div class="c2"><input type="file" name="fileField[]" id="fileField_4" /></div>
        	</li>
            <li>
              	<div class="c1">{$APPINFO['APP_CNNAME']}5：</div>
                <div class="c2"><input type="file" name="fileField[]" id="fileField_5" /></div>
        	</li>
            <li>
              	<div class="c1">{$APPINFO['APP_CNNAME']}6：</div>
                <div class="c2"><input type="file" name="fileField[]" id="fileField_6" /></div>
        	</li>
            <li>
              	<div class="c1">&nbsp;</div>
                <div class="c2"><input type="submit" id="submit_button" class="btn_b" value="上传{$APPINFO['APP_CNNAME']}" />
                </div>
        	</li>
<!--             <li>
              	<div class="c1">&nbsp;</div>
                <div class="c2"><input name="" type="checkbox" value="" /> 添加到专辑后面 </div>
        	</li> -->
        	</ul>
       		<div class="clue">
          		<p>严禁上传色情、暴力、恐怖、反动等违法{$APPINFO['APP_CNNAME']}，永葆{$site_opts.site_name}美好！</p>
       			<span class="clue_btm"></span>
     		</div>
    		</div>
   			</form>
        </div>  </div><!-- 右侧内容 end  -->
  <div class="c"></div>
</div><!-- 内容 end -->
<include file="__THEME__/footer" />
<script src="../Public/js/album.js" type="text/javascript"></script>
<script type="text/javascript">
function start_upload() {
	//必须选一个文件
	var	files = document.getElementsByName('fileField[]');
	var checked_files=0;
	for	(i=0; i < files.length; i++)
	{
		if(files[i].value!=''){
			checked_files++;
		}
	}
	if(checked_files>0){
		$('#submit_button').attr('disabled',true).val("上传中，请稍后...");
		return true;
	}else{
		alert('请至少选择一个文件上传！');
		return false;
	}
	return false;
}
</script>